package com.dcivision.workflow.applet;

import java.awt.BorderLayout;
import java.awt.SystemColor;

import javax.swing.JApplet;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JToolBar;
import javax.swing.JTree;

public class WorkflowApplet extends JApplet {

  public static final String REVISION = "$Revision: 1.6 $";

  JToolBar jToolBarMenu = new WorkflowToolBar();
  JSplitPane jSplitPaneMain = new JSplitPane();
  JTree jTree = new WorkflowElementTree();
  JScrollPane jScrollPaneTreeView = new JScrollPane(jTree);
  JPanel jPanelDesign = new JPanel();
  JScrollPane jScrollPaneDesignView = new JScrollPane(jPanelDesign);

  public WorkflowApplet() {
    super();
    try {
      jbInit();
    } catch(Exception e) {
      e.printStackTrace();
    }
  }

  private void jbInit() throws Exception {
    this.getContentPane().setBackground(SystemColor.control);
    this.setEnabled(true);
    this.setFont(new java.awt.Font("SansSerif", 0, 11));
    this.setJMenuBar(null);
    jSplitPaneMain.setToolTipText("");
    jSplitPaneMain.setContinuousLayout(true);
    jSplitPaneMain.setRightComponent(jScrollPaneTreeView);
    jSplitPaneMain.setLeftComponent(jScrollPaneDesignView);
    jSplitPaneMain.setOneTouchExpandable(true);
    jSplitPaneMain.setResizeWeight(0.0);
    this.getContentPane().add(jToolBarMenu, BorderLayout.NORTH);
    this.getContentPane().add(jSplitPaneMain, BorderLayout.CENTER);
  }


}
